package BankAccount;

import java.util.Scanner;

class BankAccount {
    int balance;
    BankAccount(){
        this.balance=0;
    }
    BankAccount(int balance){
        this.balance=balance;
    }
    void getBalance(){
        System.out.println("账户的初始余额是:"+balance);
    }
    void withdraw(int amount){
        if(amount>balance)
            System.out.println("账户余额不足");
        else {
            balance = balance - amount;
            System.out.println("取款后,账户的余额是:" + balance);
        }
    }
    void deposit(int amount){
        balance+=amount;
        System.out.println("存款后,账户的余额是:"+balance);
    }
}

public class Main {
    public static void main(String[] args) {

        Scanner reader = new Scanner(System.in);
        int balance = reader.nextInt();
        int amount1 = reader.nextInt();
        int amount2 = reader.nextInt();

        if (balance < 0 || amount1 < 0 || amount2 < 0) {
            System.out.println("输入的数据不能为负数");
        } else {
            BankAccount b = new BankAccount(balance);
            if(balance>=amount1) {
                b.getBalance();
                b.withdraw(amount1);
                b.deposit(amount2);
            }
            if(balance<amount1){
                b.withdraw(amount1);
                b.getBalance();
            }

        }

    }
}
